/*
 * =====================================================================================
 *
 *       Filename:  Facade.cpp
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  2015年01月28日 15时06分37秒
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  LiuYi (), swliuyi@gmail.com
 *   Organization:  
 *
 * =====================================================================================
 */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <limits.h>
#include <iostream>

using namespace std;

class Stock1
{
    public:
        void Sell()
        {
            cout<<"Stock1 sell"<<endl;
        }
        void Buy()
        {
            cout<<"Stock1 buy"<<endl;
        }
};

class NationalDebt1
{
    public:
        void Sell()
        {
            cout<<"NationalDebt1 sell"<<endl;
        }
        void Buy()
        {
            cout<<"NationalDebt1 buy"<<endl;
        }
};

class Realty1
{
    public:
        void Sell()
        {
            cout<<"Realty1 sell"<<endl;
        }
        void Buy()
        {
            cout<<"Realty1 buy"<<endl;
        }
};

class Fund
{
    private:
    Stock1 *st1;
    NationalDebt1 *nd1;
    Realty1 *rt1;
    public:
    Fund()
    {
        st1 = new Stock1();
        nd1 = new NationalDebt1();
        rt1 = new Realty1();
    }

    void Buy()
    {
        st1->Buy();
        nd1->Buy();
        rt1->Buy();
    }

    void Sell()
    {
        st1->Sell();
        nd1->Sell();
        rt1->Sell();
    }

    ~Fund()
    {
        delete st1;
        delete nd1;
        delete rt1;
    }

};

int main(int argc, char *argv[])
{
    Fund f;
    f.Buy();
    f.Sell();
}
